﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Tanmia.Warehouse.Core;
using FluentNHibernate.Mapping;

namespace Tanmia.Warehouse.NHibernateRepository.Mapping
{
    public class SerializedElementMap : ClassMap<SerializedElement>
    {
        public SerializedElementMap()
        {
            Table("SerializedElement");

            Id(x => x.ElementID, "SerializedElementID").Not.Nullable().GeneratedBy.Identity();
            Map(x => x.SerialNumber).Not.Nullable();
            Map(x => x.FixedPart).Nullable();

            References(x => x.Item, "ItemID").Not.Nullable();
        }
    }
}
